<?php

/**
 * Subclass for representing a row from the 'invoice_amounts' table.
 *
 * 
 *
 * @package lib.model
 */ 
class InvoiceAmounts extends BaseInvoiceAmounts
{

  function InvoiceAmounts(){
    $this->setInvoiceIden('');
    $this->setAmount(0);
    $this->setDiscount1(0);
    $this->setDiscount2(0);
    $this->setDiscount3(0);
    $this->setDiscount4(0);
  }
  
  function getSubtotal(){
    return $this->getAmount() * (1 - $this->getDiscount1()/100) * (1 - $this->getDiscount2()/100)  * (1 - $this->getDiscount3()/100) * (1 - $this->getDiscount4()/100);
  }
  
}
